﻿using mak_bll;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace markets
{
    public partial class Adminadd : Form
    {
        public Adminadd()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            string name = txtUserName.Text;
            string pwd1 = txtPassword1.Text;
            string pwd2 = txtPassword2.Text;//获取用户输入的用户名和密码

            if (name == "" || pwd1 == "" || pwd2 == "")
            {
                MessageBox.Show("请输入完整");
                return;
            }
            if (pwd2 != pwd1)
            {
                MessageBox.Show("填写的两次密码不一样");
                return;
            }
            luoji add = new luoji();
            //add.addadmin(name, pwd1);
            MessageBox.Show( add.addadmin(name, pwd1).ToString());
        }
    }
}
